package com.starlink.model.util;

import com.starlink.model.dtomapper.MallBooksRasDtoMapper;
import com.starlink.model.domain.MallBooksRasDO;
import com.starlink.model.vo.MallBooksRasVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallBooksRasConvert {

    public static List<MallBooksRasVO> buildMallBooksRasVoList(List<MallBooksRasDO> mallBooksRasDOList) {
        if (CollectionUtils.isEmpty(mallBooksRasDOList)) {
            return Lists.newArrayList();
        }
        List<MallBooksRasVO> mallBooksRasVOList = new ArrayList<>();
        for (MallBooksRasDO mallBooksRasDO : mallBooksRasDOList) {
            mallBooksRasVOList.add(MallBooksRasDtoMapper.INSTANCE.do2VO(mallBooksRasDO));
        }

        return mallBooksRasVOList;
    }
}
